﻿@model QueXian.Models.Defect

@{
    ViewBag.Title = "添加";
}

<h2>Create</h2>


@using (Html.BeginForm()) 
{
    @Html.AntiForgeryToken()
    
<div class="form-horizontal">
    <h4>Defect</h4>
    <hr />
    @Html.ValidationSummary(true, "", new { @class = "text-danger" })
<div class="form-group">
    @Html.LabelFor(model => model.DeviceID, htmlAttributes: new { @class = "control-label col-md-2" })
    <div class="col-md-10">
        <input type="radio" id="r1" name="DeviceID" value="1" /> <label for="r1">电脑</label>
        <input type="radio" id="r2" name="DeviceID" value="2" /> <label for="r2">电话</label>
        <input type="radio" id="r3" name="DeviceID" value="3" /> <label for="r3">打印机</label>
    </div>
</div>
    <div class="form-group">
        @Html.LabelFor(model => model.DefectType, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            <input type="radio" id="r1" name="DefectType" value="1" /> <label for="r1">紧急</label>
            <input type="radio" id="r2" name="DefectType" value="2" /> <label for="r2">重要</label>
            <input type="radio" id="r3" name="DefectType" value="3" checked="checked" /> <label for="r3">一般</label>
        </div>
    </div>
    <div class="form-group">
        @Html.LabelFor(model => model.Content, htmlAttributes: new { @class = "control-label col-md-2" })
        <div class="col-md-10">
            @Html.EditorFor(model => model.Content, new { htmlAttributes = new { @class = "form-control" } })
            @Html.ValidationMessageFor(model => model.Content, "", new { @class = "text-danger" })
        </div>
    </div>


    <div class="form-group">
        <div class="col-md-offset-2 col-md-10">
            <input type="submit" value="Create" class="btn btn-default" />
        </div>
    </div>
</div>
}

<div>
    @Html.ActionLink("返回首页", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
